package com.cn.intelligence.controller;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

import com.cn.intelligence.service.PickManagerService;
import com.cn.intelligence.util.JsonUtils;

/**
 * Created by Administrator on 2017/4/20.
 */
@Controller
public class PickureController {

    @Autowired
    private PickManagerService pickManagerService;
    /**
     * 参数必须和页面的参数一致
     * @param uploadFile
     * @return
     */
    @RequestMapping("/pic/upload")
    @ResponseBody
    public String pickeureUpload(MultipartFile uploadFile){
        Map map=pickManagerService.picFileUpload(uploadFile);
        String json =JsonUtils.objectToJson(map);
        return json;
    }
}
